<template>
	<view>
		<view class="zy-status-bar"></view>
		
		<view class="zy-ph-50">
			<view class="zy-register-title" > 我们应该</view>
			<view class="zy-register-title2" > 怎么称呼您？</view>
			<input class="zy-register-input zy-mt-50" v-model="data.nick" placeholder=" 请输入昵称" />
			<zy-register-bottom @next="next"> </zy-register-bottom>
		</view>
	</view>
</template>

<script>
	import RouteUtil from '@/main/common/RouteUtil.js';
	import CacheUtil from '@/main/common/CacheUtil';
	export default {
		data() {
			return {
				data: {
					sex: '',
					nick: '',
					birthday: '',
					// passWord: ''
				},
			};
		},
		onLoad() {
			if(CacheUtil.getRegisterUser()){
				this.data = CacheUtil.getRegisterUser();
			}
		},
		methods: {
			next() {
				if (!this.data.nick) {
					uni.$toast.show('请填写昵称');
					return;
				}
				CacheUtil.setUserName(this.data.nick)
				CacheUtil.setRegisterUser(this.data)
				RouteUtil.toRegister2()
			}
		}
	};
</script>

<style lang="scss">
	.content {
		width: 100wh;
		height: 100vh;
		margin: 0 50rpx;

		.title {
			font-weight: bold;
			font-size: 48rpx;
			color: #222;
		}

		.input {
			border-bottom: 1rpx solid #ccc;
			font-size: 32rpx;
			color: #555;
			line-height: 50rpx;
			padding: 20rpx 0;
		}

	}
</style>